/*
Script written by ~icy~ѧϰ
Script   : Acpr1.41-2.0_unpackerȫԶѿ
     : 2007-03-26
Ի : OllyDbg 1.1, ODBGScript 1.51, Winxp Win2003
ѡ :  OllyDbg 쳣ѡ 
     : OllyDbg, ODBGScript 1.51, Import Reconstructor.
*/
//support ACprotect1.41-2.0  UltraProtect 1.x

var eipaddr1 
var esiadd   
var ebxadd   
var cbase
var csize
var imgbase 
var iatrva
var add1

GMI eip, MODULEBASE 
cmp $RESULT,0
je lblabort
mov imgbase,$RESULT

gmi eip,CODEBASE                       //ô
cmp $RESULT,0
je lblabort
mov cbase,$RESULT
mov cbase,$RESULT
gmemi cbase,MEMORYsize
cmp $RESULT,0 
je lblabort
mov csize,$RESULT
gpa "GetModuleHandleA","kernel32.dll"
cmp $RESULT,0
je lblabort
mov add1,$RESULT
bprm add1,ff 
esto 
bpmc
rtu 
findop eip,#F3AA#                     //ָ
cmp $RESULT,0
je lblabort   
repl $RESULT,#F3AA#,#9090#,2 
bp $RESULT
run
bc $RESULT
sto 
sto 
sto
bprm add1,ff
esto
bpmc
rtu
mov eipaddr1,eip
mov eipaddr1,eipaddr1-30
mov esiadd,esi+0c 
mov ebxadd,ebx-imgbase
mov [esiadd],ebxadd
mov iatrva,esi-imgbase
findop eipaddr1,#83660c00#           //ַвңand dword ptr ds:[esi+C],0
cmp $RESULT,0
je lblabort
repl $RESULT,#83660C00#,#90909090#,4
find eipaddr1,#2BC08803#             //ڴв:sub eax,eax mov byte ptr ds:[ebx]
cmp $RESULT,0
je lblabort
repl $RESULT,#2BC08803#,#90909090#,4
find eipaddr1,#2BC08803#
cmp $RESULT,0
je lblabort
repl $RESULT,#2BC08803#,#90909090#,4
find eipaddr1,#80BD16564100007457#   //ħ
je lblabort
repl $RESULT,#80BD16564100007457#,#80BD1656410000eb57#,9 //jmp
find eipaddr1,#8DBD??????0033C0#
cmp $RESULT,0
je lblabort
bp $RESULT
esto
bc $RESULT
bpmc
bprm cbase,csize
esto
cmt eip,"˵еĹ֮~OEP~"
dpe "\\ѿδ޸IAT.exe", eip
eval "ѿֱImportREC޸IAT"
msg $RESULT
ret

lblabort:
msg "űʧ!"
ret